import JSON5 from 'json5';

export default class Json5 {

  static Encoder = class Encoder {
    static Name = "<%= UIText.Build %> JSON5";

    compute(data) {
      return JSON5.stringify(data, null, 2);
    }
  }

  static Decoder = class Decoder {
    static Name = "<%= UIText.Parse %> JSON5";

    compute(text) {
      return JSON5.parse(text);
    }
  }
}
